<div id='chatarea-left'>
                    <div id='chat-left-title'>
                        Danh sách thành viên:
                    </div>                    
                    <div id='chat-left-head'>
                        <div class='chat-left-head-ul'>
                            <div id='num-user'>
                                <?php
                                // Truy vấn CSDL lấy số lượng người trong group chat
                                $query = "SELECT DISTINCT Count(`user_id`) as num_users FROM `user` as u INNER JOIN `connect` as c USING(user_id) WHERE c.group_id = {$gid}";
                                $result = mysqli_query($dbc, $query);
                                if(mysqli_num_rows($result)>0){
                                    list($num_users) = mysqli_fetch_array($result,MYSQLI_NUM);                                    
                                    echo $num_users;
                                }
                                ?>
                            </div>
                            <div class='num-text'>
                                Users
                            </div>
                        </div><!-- end chat-left-head-ul -->
                        <div class='chat-left-head-ul'>
                            <div id='num-user-on'>
                                <?php
                                // Truy vấn CSDL lấy số lượng người người online
                                $query = "SELECT DISTINCT Count(`user_id`) as num_users FROM `user` as u INNER JOIN `connect` as c USING(user_id) WHERE c.group_id = {$gid} AND u.user_online=1";
                                $result = mysqli_query($dbc, $query);
                                if(mysqli_num_rows($result)>0){
                                    list($num_users) = mysqli_fetch_array($result,MYSQLI_NUM);
                                    echo $num_users;
                                }
                                ?>
                            </div>
                            <div class='num-text'>
                                Users online
                            </div>
                        </div><!-- end chat-left-head-ul -->
                    </div><!-- end chat-left-head -->
                    <div id='chat-left-body'>
                        <ul id='chat-left-user-list'>
                            <?php
                            //Truy vấn số lượng user trong phòng chat và số lượng user online
                            $query = "SELECT u.user_id,u.user_name,u.user_avatar,u.user_online"
                                    . " FROM `user` as u INNER JOIN `connect` as c USING(user_id)"
                                    . " WHERE c.group_id = {$gid} AND u.user_id <> {$_SESSION['uid']}"
                                    . " ORDER BY u.user_online DESC,u.user_name ASC ";
                            $result = mysqli_query($dbc, $query);
                            if(mysqli_num_rows($result)>0){
                                while ($u_list = mysqli_fetch_array($result,MYSQLI_ASSOC))
                                {
                                    echo "<li><div class='chat-left-uavatar'>
                                        <a href='./TrangCaNhan.php?uid={$u_list['user_id']}'>
                                    <img src='Images/Uploads/".show_avatar($u_list['user_avatar'])."' width='40' height='40' alt='user-avatar'></div>
                                    <div class='chat-left-uname'>"
                                        .ucfirst($u_list['user_name']).
                                    "</a></div>"
                                    .check_online($u_list['user_online']).
                                    "</li>";
                                }
                            }
                            ?>                            
                        </ul>
                        <?php
                        //Truy vấn CSDL lấy thông tin người dùng
                        $query = "SELECT user_id,user_name,user_avatar,user_email FROM `user` WHERE user_id = {$_SESSION['uid']}";
                        $result = mysqli_query($dbc, $query);
                        if(mysqli_num_rows($result)>0){
                            list($uid,$uname,$uavatar,$uemail) = mysqli_fetch_array($result,MYSQLI_NUM);
                        }
                        ?>
                        <div id='user-info'>
                            <div id='user-info-avatar'>
                                <img src='Images/Uploads/<?php echo show_avatar($uavatar); ?>' id='user-avatar-info' class='<?php echo show_avatar($uavatar); ?>' alt='user-avatar' width='50' height='50'>
                            </div>
                            <div id='user-infos'>
                                <div id='user-info-hidden'>
                                <div id='hidden-id' title='<?php echo $uid; ?>'></div>
                                <div id='hidden-gid' title='<?php if(isset($_GET['gid'])){echo $_GET['gid'];} ?>'></div>                                
                                </div>
                                <div id='user-info-uname' value='<?php echo ucfirst($uname) ?>'>
                                <?php echo ucfirst($uname); ?>
                            </div>
                            <div id='user-info-email'>
                                <?php echo $uemail; ?>
                            </div>
                            </div>
                        </div>
                    </div><!-- end chat-left-body -->
                </div><!-- end chatarea-left -->